package com.tyfspring.beans.config;

import com.tyfspring.beans.exception.BeansException;

/**
 * @Description bean后处理器，修改实例化后bean的扩展修改点
 * @Author shallow
 * @Date 2023/3/26 13:07
 */
public interface BeanPostProcessor {

    /**
     * Bean对象初始化之前执行该方法
     * @param bean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object postProcessBeforeInitialization(Object bean,String beanName) throws BeansException;

    /**
     * Bean对象初始化后执行该方法
     * @param bean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException;
}
